Skip to content

feat: ✨ beautify CLI help message#140

Open
joelostblom wants to merge 20 commits intomainfrom
feat/beautify-cli-help
Open

feat: ✨ beautify CLI help message#140
joelostblom wants to merge 20 commits intomainfrom
feat/beautify-cli-help

Conversation

@joelostblom
Copy link
Contributor

@joelostblom joelostblom commented Feb 20, 2026

Description

Changes the help format from

image

to

image

Details in #138

Closes #138

Needs a a thorough review.

Checklist

  • Ran just run-all

This includes some commented code that will be removed in the following commits just so
that I have it saved somewhere in the history as a previous attempt
in case we want to go back to it.
@joelostblom joelostblom force-pushed the feat/beautify-cli-help branch from 31e2dec to c9251ff Compare February 23, 2026 15:47
.coveragerc Outdated
@@ -0,0 +1,2 @@
[run]
omit = src/seedcase_flower/internals.py
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This excludes our private code from the coverage percentage. I remember we mentioned before that we only test public facing code (and implicitly the private code as it is used in the public facing code). I don't know if we want it formal through a change like this but I'm including it as a suggestion since this PR fails coverage without it (could be made its own PR).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand. Is that because the code you're adding isn't used when running via tests, so doesn't get picked up by the coverage?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'm unsure how to test this since there is no public function calling this code. It is only used during the initialization of app, should we create a test for app --help which compares the output help string to a fixed test case? It seems a bit wonky, but that the public facing component is correct formatting of the help message.

It would be easier to test the private function directly, but then there could be a gap to what we think is the correct behavior and what actually makes the help message look the way it should.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, I think for now, it's fine to keep it in the coverage percent. It truthfully shows that not all code has been covered, which is true! 😛 So you can delete this file ☺️

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, removed!

@joelostblom joelostblom marked this pull request as ready for review February 23, 2026 16:23
@joelostblom joelostblom requested a review from a team as a code owner February 23, 2026 16:23
@joelostblom joelostblom moved this from In Progress to In Review in Product development Feb 23, 2026
@lwjohnst86 lwjohnst86 changed the title feat: ✨ Beautify cli help message feat: ✨ beautify CLI help message Feb 24, 2026
Copy link
Member

@lwjohnst86 lwjohnst86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super nice! Just some very small suggestions and a question

.coveragerc Outdated
@@ -0,0 +1,2 @@
[run]
omit = src/seedcase_flower/internals.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand. Is that because the code you're adding isn't used when running via tests, so doesn't get picked up by the coverage?

@github-project-automation github-project-automation bot moved this from In Review to In Progress in Product development Feb 24, 2026
Copy link
Member

@signekb signekb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm excited about this 🎉
Just one question:

@joelostblom joelostblom moved this from In Progress to In Review in Product development Feb 24, 2026
.coveragerc Outdated
@@ -0,0 +1,2 @@
[run]
omit = src/seedcase_flower/internals.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, I think for now, it's fine to keep it in the coverage percent. It truthfully shows that not all code has been covered, which is true! 😛 So you can delete this file ☺️

@github-project-automation github-project-automation bot moved this from In Review to In Progress in Product development Feb 24, 2026
Copy link
Member

@signekb signekb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment about a comment 💭 :

@github-project-automation github-project-automation bot moved this from In Review to In Progress in Product development Feb 24, 2026
@joelostblom joelostblom requested a review from signekb February 24, 2026 16:37
@joelostblom joelostblom moved this from In Progress to In Review in Product development Feb 24, 2026
Copy link
Member

@lwjohnst86 lwjohnst86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, coverage is at 89.something percent and we've set it at a threshold of 90 haha

Related to that, you can do some Unit Testing of the app: https://cyclopts.readthedocs.io/en/stable/cookbook/unit_testing.html#unit-testing

Can you try to implement it? Would be useful for us to have that infrastructure/code to know how to test the CLI.

@github-project-automation github-project-automation bot moved this from In Review to In Progress in Product development Feb 25, 2026
@joelostblom
Copy link
Contributor Author

joelostblom commented Feb 25, 2026

Great find! I agree it would be great to add tests for the App interface in general. Do you want them in this PR or a separate one to keep this one smaller (and since it will also include tests for CLI code that is not new additions in this PR but existed since previously such as testing that the config file is being read)?

@joelostblom joelostblom moved this from In Progress to In Review in Product development Feb 25, 2026
martonvago
martonvago previously approved these changes Feb 25, 2026
Copy link
Contributor

@martonvago martonvago left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Copy link
Member

@lwjohnst86 lwjohnst86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea if you could add the tests that would be great 👍

@github-project-automation github-project-automation bot moved this from In Review to In Progress in Product development Feb 25, 2026
@lwjohnst86
Copy link
Member

I think you'll be able to keep the tests mostly specific to this PR, if my reading of the docs is accurate.

@joelostblom
Copy link
Contributor Author

I will add test, but if we can review and merge #155 first then it will be easier as I can base it on that general app testing skeleton and just add tests for the additional functionality here.

lwjohnst86 added a commit that referenced this pull request Feb 27, 2026
This is a first implementation of the tests we can use to check that the
CLI is behaving correctly. I think this covers most of what we currently
have in main, at least we reach 💯 % coverage!

Merging this before some of the existing PRs e.g. #140 and #152 will
make it easier to add new tests specifically for the functionality added
there instead of convoluting it with testing the general functionality
of the app which is tested here instead.

I tried to follow the cyclopts test docs as closely as possible, but let
me know if you think something is missing. I also experimented with
using the Copilot CLI for the first time to help me get started and
understanding how to write the tests. It was quite useful, particularly
to get started, but I did have to delete about half of its suggestions
because there was a lot of redundancy. Thought I would mention it in
case someone catches something odd in here so I can blame it and not me
=p

Needs a thorough review.

## Checklist

- [x] Ran `just run-all`

---------

Co-authored-by: Luke W. Johnston <lwjohnst86@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Copy link
Contributor Author

@joelostblom joelostblom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added tests for the color and angle bracket markup, so this is ready for another look now.

@joelostblom joelostblom moved this from In Progress to In Review in Product development Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

Beautify help message

4 participants